package com.zhongyouyun.admin.model;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @Author: shenyi
 * @Date: 2023-05-15
 * @Description:
 */

@JsonInclude(JsonInclude.Include.NON_NULL)
@Accessors(chain = true)
@ApiModel(value = "OrderModel对象", description = "")
@Data
@TableName("z_order")
public class OrderModel implements Serializable {

    private static final long serialVersionUID = 1L;

    public static final String ORDER_TYPE_NEW = "0";
    public static final String ORDER_TYPE_CANCEL = "1";
    public static final String ORDER_TYPE_PART = "2";
    public static final String ORDER_TYPE_FINISH = "3";

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @ApiModelProperty(value = "订单名称")
    @TableField("order_name")
    private String orderName;

    @ApiModelProperty(value = "订单号")
    @TableField("order_no")
    private String orderNo;

    @ApiModelProperty(value = "支付连接")
    @TableField("pay_url")
    private String payUrl;

    @ApiModelProperty(value = "订单状态(0待支付，1已关闭，2支付成功，3退款)")
    @TableField("status")
    private String status;

    @ApiModelProperty(value = "订单金额")
    @TableField("amount")
    private BigDecimal amount;

    @ApiModelProperty(value = "批次ID")
    @TableField("batch_id")
    private String batchId;

    @ApiModelProperty(value = "考试ID")
    @TableField("examination_code")
    private String examinationCode;

    @ApiModelProperty(value = "公司ID")
    @TableField("company_id")
    private String companyId;

    @ApiModelProperty(value = "用户id")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty(value = "所属部门id")
    @TableField("dept_id")
    private Long deptId;


    @ApiModelProperty(value = "订单取消时间")
    @TableField("expireTime")
    private Date expireTime;

    @ApiModelProperty(value = "创建时间")
    @TableField("createTime")
    private Date createTime;

    @ApiModelProperty(value = "修改时间")
    @TableField("updateTime")
    private Date updateTime;

    @ApiModelProperty(value = "备注")
    @TableField("remark")
    private String remark;


}